<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>常用事件</title>
	</head>
	<body>
		用户名：<input type="text" name="username" onfocus="hqjd()" onblur="sqjd()">
		<script type="text/javascript">
			//常用标签除了鼠标放置与否，还有获取焦点(onfocus)、失去焦点(onblur)
		function hqjd(){
			alert("获取焦点");
		}
		function sqjd(){
			alert("失去焦点");
		}
		</script>
	</body>
</html>
